package com.test3;

public class Zhiwu {
    String name;
    int hp;
    int attack;
    public Zhiwu(String name,int hp,int attack){
        this.name = name;
        this.hp = hp;
        this.attack=attack;
    }
    public void fight(JiangShi js){
        System.out.println(this.name+"在打"+js.name);
        js.hp-=this.attack;
        System.out.println("僵尸的血剩余："+js.hp);
    }
}
